home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / mudlib / sys / lpctypes.h < prev    next >
C/C++ Source or Header  |  2001-07-14  |  1KB  |  46 lines

  1. #ifndef LPC_LPCTYPES_H
  2. #define LPC_LPCTYPES_H
  3.  
  4. /* compile time types, from functionlist() */
  5.  
  6. #define TYPE_UNKNOWN    0       /* This type must be casted */
  7. #define TYPE_NUMBER     1
  8. #define TYPE_STRING     2
  9. #define TYPE_VOID       3
  10. #define TYPE_OBJECT     4
  11. #define TYPE_MAPPING    5
  12. #define TYPE_FLOAT      6
  13. #define TYPE_ANY        7       /* Will match any type */
  14. #define TYPE_SPACE      8
  15. #define TYPE_CLOSURE    9
  16. #define TYPE_SYMBOL    10
  17. #define TYPE_QUOTED_ARRAY 11
  18. #define TYPE_TERM      12
  19.  
  20. #define TYPE_MOD_POINTER        0x0040  /* Pointer to a basic type        */
  21.  
  22. /* runtime types, from typeof() */
  23.  
  24. #define T_INVALID       0x0
  25. #define T_LVALUE        0x1
  26. #define T_NUMBER        0x2
  27. #define T_STRING        0x3
  28. #define T_POINTER       0x4
  29. #define T_OBJECT        0x5
  30. #define T_MAPPING       0x6
  31. #define T_FLOAT         0x7
  32. #define T_CLOSURE       0x8
  33. #define T_SYMBOL        0x9
  34. #define T_QUOTED_ARRAY  0xa
  35.  
  36. #define CLOSURE_IS_LFUN(x)        (((x)&~1) == 0)
  37. #define CLOSURE_IS_IDENTIFIER(x)    ((x) == 2)
  38. #define CLOSURE_IS_BOUND_LAMBDA(x)    ((x) == 4)
  39. #define CLOSURE_IS_LAMBDA(x)        ((x) == 5)
  40. #define CLOSURE_IS_UNBOUND_LAMBDA(x)    ((x) == 6)
  41. #define CLOSURE_IS_SIMUL_EFUN(x) (((x) & 0xf800) == 0xf800)
  42. #define CLOSURE_IS_EFUN(x)     (((x) & 0xf800) == 0xf000)
  43. #define CLOSURE_IS_OPERATOR(x)     (((x) & 0xf800) == 0xe800)
  44.  
  45. #endif /* LPC_LPCTYPES_H */
  46.